<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>



<link href="css/style.css" rel="stylesheet" type="text/css" />
<link href="<%=path %>/css/bootstrap.min.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="js/jquery.js"></script>
<script type="text/javascript" src="<%=path %>/js/news/news_list.js"></script>
<script type="text/javascript" src="<%=path %>/js/resources/moment.js"></script>
<script type="text/javascript" src="<%=path %>/js/resources/moment-zh-cn.js"></script>

<%--分页相关 --%>
<link href="<%=path %>/resources/page/bootstrapv3.min.css" rel="stylesheet" type="text/css" />
<link href="<%=path %>/resources/page/bootstrapv3.min.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="<%=path %>/resources/page/jquery-1.9.1.min.js"></script>
<script type="text/javascript" src="<%=path %>/resources/page/bootstrapv3.js"></script>
<script type="text/javascript" src="<%=path %>/resources/page/bootstrap-paginator.js"></script>
<script type="text/javascript" src="<%=path %>/js/resources/common.js"></script>

<style>
<!--
-->
 tr{
 	height:40px;
 	line-height:30px;
 }
</style>
<script type="text/javascript">
$(document).ready(function(){ 
	var path='<%=basePath%>';
	
	initNewsTable(path,1);
	

	initPages(1,100);
        
        $("#pager").bootstrapPaginator("setOptions",{
        	/* pageUrl: function(type, page, current){                 
        		initLogTable(path,page);
    		}, */
    		onPageClicked: function(e,originalEvent,type,page){
    			initNewsTable(path,page);
            }
        });
        
        
  $(".click").click(function(){
  $(".tip").fadeIn(500);
  });
  
  $(".tiptop a").click(function(){
  $(".tip").fadeOut(200);
});

  $(".sure").click(function(){
  $(".tip").fadeOut(100);
});

  $(".cancel").click(function(){
  $(".tip").fadeOut(100);
});
  

	/* 全选/取消选中  */
	$("#news_checkall").bind("click", function() {
		if (this.checked) { 
			$("input[type=checkbox]").prop("checked", 'true');
		} else {
			$("input[type=checkbox]").removeAttr("checked");
		}
	}); 
	
	$("#delNews").bind("click",function(){
		
		$(".tip").fadeIn(500);
		
		  $(".sure").click(function(){
			  delNews(path);
			});
	});
	

});
</script>


	<jsp:include page="common.jsp"></jsp:include>
	<div class="place">
    <span>位置：</span>
    <ul class="placeul">
    <li><a href="#">新闻设置</a></li>
    <li><a href="#">新闻列表</a></li>
    </ul>
    </div>
    
    <div class="rightinfo">
    
    <div class="tools">
    
    	<ul class="toolbar">
        <li id="delNews"><span><img src="images/t03.png"/></span>删除</li>
        </ul>
        
        
    </div>
    
    
    <table class="tablelist">
    	<thead>
    	<tr>
        <th><input name="" id="news_checkall" type="checkbox" value=""/></th>
        <th>标题</th>
        <th>副标题</th>
        <th>创建时间</th>
        <th>新闻时间</th>
        <th>摘要</th>
        <th>操作</th> 
        </tr>
        </thead>
        <tbody id="news_databody">
        
        </tbody>
    </table>
    
	<ul id="pager" style="margin-left:40%;"></ul>
    
    
    <div class="tip">
    	<div class="tiptop"><span>提示信息</span><a></a></div>
        
      <div class="tipinfo">
        <span><img src="images/ticon.png" /></span>
        <div class="tipright">
        <p>是否确认对信息的修改 ？</p>
        <cite>如果是请点击确定按钮 ，否则请点取消。</cite>
        </div>
        </div>
        
        <div class="tipbtn">
        <input name="" type="button"  class="sure" value="确定" />&nbsp;
        <input name="" type="button"  class="cancel" value="取消" />
        </div>
    
    </div>
    
    
    
    
    </div>
    
    <script type="text/javascript">
	$('.tablelist tbody tr:odd').addClass('odd');
	</script>

	